<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="hardcode2013.*" %>

<html>
	<head>
		<link type="text/css" rel="stylesheet" href="/stylesheets/main.css" />
	</head>

	<body>
  
		<%@include file="include_header.jsp" %>
  
		<%
		if (profile != null) {
			%>
			<fieldset>
				<legend>Change Password</legend>
				<form action="/account" method="post">
					Old Password: <input type="password" name="old_password"><br>
					New Password: <input type="password" name="new_password"><br>
					Confirm New Password: <input type="password" name="new_confirm_password"><br>
					<input type="hidden" name="action" value="change_password">
					<input type="hidden" name="redirect" value="/account.jsp">
					<input type="hidden" name="auth_key" value="<%= SessionUtil.getAuthKey(request) %>">
					<input type="submit" value="Change" />
				</form>
			</fieldset>
			
			<fieldset>
				<legend>Delete Account</legend>
				<form action="/account" method="post">
					Password: <input type="password" name="password"><br>
					<input type="hidden" name="action" value="delete_account">
					<input type="hidden" name="redirect" value="/account.jsp">
					<input type="hidden" name="auth_key" value="<%= SessionUtil.getAuthKey(request) %>">
					<input type="submit" value="Delete" />
				</form>
			</fieldset>
			<%
		}
		%>
	</body>
</html>